﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.Model;
using University.Workshop.Business;

namespace University.Workshop.Presenters.MedicalSuppliesFolder
{
    public class PresenterMedicalSupplies
    {
        IMedicalSupplies view;

        public PresenterMedicalSupplies(IMedicalSupplies view)
        {
            this.view = view;
        }

        public string AddMedicalSupply()
        {
            
            try
            {
                MedicalSuppliesManager.RegisterNewMedicalSupplies(view.ItemName, view.ItemId, view.Lot, view.ExpirationDate , view.QuantityAvailable);               
            }
            catch (NotImplementedException ex)
            {
                return ex.Message;
            }
            return  "El suministro medico ha sido registrado con exito";
        }

        public static bool Cleaner(string message)
        {
            if (PatientManager.CleanSpaces(message))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }


    
}
